package com.plian.system.service.lg;

import com.plian.system.dto.lg.LawDisputeDTO;
import com.plian.system.entity.lg.LawDispute;
import com.plian.system.model.ListResult;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.mybatis.support.Query;
import com.plian.system.vo.lg.*;
import com.plian.system.vo.report.ChartsVO;
import com.plian.system.vo.report.PieChartVO;
import com.plian.system.vo.report.ReportReturnVO;

import java.io.File;
import java.util.List;

/**
 * <p>
 * 法律纠纷 服务类
 * </p>
 *
 * @author hu song
 * @since 2023-01-30
 */
public interface ILawDisputeService extends BaseService<LawDispute> {

    /**
     * 分页查询
     * @param query
     * @return
     */
    ListResult<LawDisputeVO> findAll(Query query);

    /**
     * 重大案件列表
     * @param query
     * @return
     */
    ListResult<LawDisputeVO> findMajorCases(Query query);

    /**
     * 根据id查询
     * @param lawDispute
     * @return
     */
    LawDisputeVO detail(LawDispute lawDispute);

    /**
     *
     * @param lawDisputeDTO
     * @return
     */
    ReportReturnVO lawDisputeSummary(LawDisputeDTO lawDisputeDTO);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    boolean delete(Long[] ids);

    /**
     * 构造PDF
     * @param bean
     * @return
     */
    File buildpdf(LawDisputeSummaryVO bean);

    /**
     * 案件统计
     * @return
     */
    TotalCasesVO totalCases(String year, String unitId);

    /**
     * 案件构成占比
     * @return
     */
    PieChartVO proportionOfCases(String year, String unitId);

    /**
     * 案件构成排名
     * @return
     */
    List<RankingOfCasesVO> rankingOfCases(String year, String unitId);

    /**
     * 涉案金额占比
     * @param year
     * @param unitId
     * @return
     */
    PieChartVO proportionOfAmountInvolved(String year, String unitId);

    /**
     * 单位排名
     * @param year
     * @param unitId
     * @return
     */
    List<RankingOfUnitVO> rankingOfUnit(String year, String unitId);

    /**
     * 案件趋势
     * @param year
     * @param unitId
     * @return
     */
    ChartsVO caseTrends(String year, String unitId);

    /**
     * 删除子表信息
     * @param ids
     */
    void deleteChildren(List<String> ids);
}
